import request from "@/utils/axios";

export function login(params) {
  return request({
    url: "/doudou/login",
    method: "post",
    data: params,
  });
}
export function logout(params) {
  return request({
    url: "/user/logout",
    method: "get",
    data: params,
  });
}

export function categorysearch(params) {
  return request({
    url: "/doudou/categorysearch",
    method: "post",
    data: params,
  });
}

export function getUserInfo(params) {
  return request({
    url: "/user/info/get",
    method: "get",
    data: params,
  });
}

export function getCarList(params) {
  return request({
    url: "/doudou/productlist",
    method: "post",
    data: params,
  });
}
export function productdel(params) {
  return request({
    url: "/doudou/productdel",
    method: "post",
    data: params,
  });
}

export function getCarById(params) {
  return request({
    url: `/doudou/productinfo/${params.id}`,
    method: "get",
    data: params,
  });
}

export function getCategoryList(params) {
  return request({
    url: "/doudou/categorylist",
    method: "get",
    data: params,
  });
}

// 分类删除
export function categorydel(reqData) {
  return request({
    url: "/doudou/categorydel",
    method: "post",
    data: reqData,
  });
}

export function categoryrangeadd(reqData) {
  return request({
    url: "/doudou/categoryrangeadd",
    method: "post",
    data: reqData,
  });
}

export function getUserList(reqData) {
  return request({
    url: "/doudou/userlist",
    method: "post",
    data: reqData,
  });
}

export function clientlist(reqData) {
  return request({
    url: "/doudou/clientlist",
    method: "post",
    data: reqData,
  });
}

export function register(reqData) {
  return request({
    url: "/doudou/register",
    method: "post",
    data: reqData,
  });
}

export function userchange(reqData) {
  return request({
    url: "/doudou/userchange",
    method: "post",
    data: reqData,
  });
}
